package com.trkj.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the MEDCINESTORE_TYPE database table.
 * 
 */
@Entity
@Table(name="MEDCINESTORE_TYPE")
@NamedQuery(name="MedcinestoreType.findAll", query="SELECT m FROM MedcinestoreType m")
public class MedcinestoreType implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="MEDCINESTORE_TYPE_ID")
	private long medcinestoreTypeId;

	@Column(name="MEDCINESTORE_TYPENAME")
	private String medcinestoreTypename;

	//bi-directional many-to-one association to Medcinestore
	@OneToMany(mappedBy="medcinestoreType")
	private List<Medcinestore> medcinestores;

	public MedcinestoreType() {
	}

	public long getMedcinestoreTypeId() {
		return this.medcinestoreTypeId;
	}

	public void setMedcinestoreTypeId(long medcinestoreTypeId) {
		this.medcinestoreTypeId = medcinestoreTypeId;
	}

	public String getMedcinestoreTypename() {
		return this.medcinestoreTypename;
	}

	public void setMedcinestoreTypename(String medcinestoreTypename) {
		this.medcinestoreTypename = medcinestoreTypename;
	}

	public List<Medcinestore> getMedcinestores() {
		return this.medcinestores;
	}

	public void setMedcinestores(List<Medcinestore> medcinestores) {
		this.medcinestores = medcinestores;
	}

	public Medcinestore addMedcinestore(Medcinestore medcinestore) {
		getMedcinestores().add(medcinestore);
		medcinestore.setMedcinestoreType(this);

		return medcinestore;
	}

	public Medcinestore removeMedcinestore(Medcinestore medcinestore) {
		getMedcinestores().remove(medcinestore);
		medcinestore.setMedcinestoreType(null);

		return medcinestore;
	}

}